<template>
  <view class="search-goods" :style="{ height: height + 'rpx' }">
    <view>
      <text class="iconfont icon-sousuo"></text>
      <input type="text" placeholder="搜索商品" @input="input" />
    </view>
  </view>
</template>

<script>
export default {
  props: {
    height: {
      type: [String, Number],
      default: '70'
    }
  },
  methods: {
    input(e) {
      this.$emit('input', e.target.value)
    }
  }
}
</script>

<style lang="scss" scoped>
.search-goods {
  position: fixed;
  width: 750rpx;
  top: 0;
  left: 0;
  z-index: 99999;
  background-color: #fff;
  view {
    display: flex;
    align-items: center;
    margin: 0 auto;
    width: 702rpx;
    height: 70rpx;
    background: #f4f4f4;
    border-radius: 35rpx;

    text {
      margin: 0 26rpx;
      color: 808080;
    }
    input {
      flex: 1;
    }
  }
}
</style>
